/*-----------------------------------------------------------------------------
 * event_private.h - private structures for the event library implementation
 *
 * Forhad Ahmed, June 2009
 *-----------------------------------------------------------------------------
 */

#ifndef _EVENT_PRIVATE_H_
#define _EVENT_PRIVATE_H_

#include "list.h"
#include "threads.h"
#include "event_malloc.h"


#define EVENT_HASH_SIZE  32


typedef struct event_t {
    int          code;
    void        *data;
    event_chunk *chunk;
} event;


struct event_manager_t { 
    semaphore     event_sem;
    list_node    *event_queue;
    mutex         queue_lock;
    mutex         chunk_lock;
    event_chunk **chunk_hash;
}


#endif /* _EVENT_PRIVATE_H_ */

